﻿/*
 * blood_pressure表的业务逻辑
 * */
using System;
using System.Collections.Generic;
using System.Text;
using WH.NurseSys.Model;
using WH.NurseSys.DAL;

namespace WH.NurseSys.BLL
{
    public class BloodPressureBLL
    {
        public bool Insert(BloodPressure bloodPressure)
        {
            return new BloodPressureDAL().Insert(bloodPressure);
        }

        public bool Delete(Guid id)
        {
            return new BloodPressureDAL().Delete(id);
        }

        public bool Update(BloodPressure bloodPressure)
        {
            return new BloodPressureDAL().Update(bloodPressure);
        }

        public BloodPressure GetById(Guid id)
        {
            return new BloodPressureDAL().GetById(id);
        }

        //按人获取列表
        public List<BloodPressure> GetListByPatient(Guid patientId)
        {
            return new BloodPressureDAL().GetListByPatient(patientId);
        }

        //判断是否已存在
        public bool Exist(Guid id)
        {
            if (new BloodPressureDAL().GetById(id) == null)
                return false;
            else
                return true;
        }
    }
}
